<style type="text/css">
th, tr, td {
    text-align: center;
}
</style>

<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/OneReport/oneReport"
          method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="oneReport"/>
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel"/>
            <label>时间段：</label>
            <input type="text" name="startTime" data-pattern="yyyy-MM-dd" value="${startTime}" size="12"
                   data-toggle="datepicker" placeholder="FROM">
            <input type="text" name="endTime" data-pattern="yyyy-MM-dd" value="${endTime}" size="12"
                   data-toggle="datepicker" placeholder="TO">&nbsp;&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <button type="button" class="btn-blue"
                    onclick="javascript:bjuiExportExl('#pagerForm', '${request.getContextPath()}/TestData/exportExcel')"
                    data-icon="file-excel-o" title="导出Excel">导出</button>
        </div>
    </form>
</div>

<div class="panel-body">
    <div style="mini-width:400px;height:450px;" id="cellGlassOutputDiv"></div>
</div>

<div class="bjui-pageContent tableContent">
    <g:if test="${oneReport.size() > 0}">
        <div>
            <table id="data" data-toggle="tablefixed" data-width="100%" data-nowrap="true">
                <thead>
                <tr id="t1">
                    <th width="50">NO.</th>
                    <g:each in="${tableHeadList}" status="j" var="headInstance">
                        <g:if test="${headInstance != 'RN' && headInstance != 'CREATE_TIME'}">
                            <th><g:message code="${headInstance}" default="${headInstance}"/></th>
                        </g:if>
                    </g:each>
                </tr>
                </thead>
                <tbody>
                %{--<g:if test="${oneReport.size() > 0}">--}%
                <g:each in="${oneReport}" status="i" var="dataInstance">
                    <tr>
                        <td>${i + 1}</td>
                        <g:each in="${tableHeadList}" status="j" var="headInstance">
                            <g:if test="${headInstance == 'STAGE_ID'}">
                                <td>${dataInstance.STAGE_ID}</td>
                            </g:if>
                            <g:elseif test="${headInstance == 'ACTUAL_QTY'}">
                                <td name="INQTY${i}">
                                    <a href="${request.getContextPath()}/OneReport/oneReportStep?params=RUN&stageId=<%=dataInstance.STAGE_ID%>&startTime=<%=params.startTime%>&endTime=<%=params.endTime%>"
                                       data-toggle="navtab" data-id="dialog-normal"
                                       data-options="{id:'oneReportStep', title:'站内明细'}">
                                        ${dataInstance.ACTUAL_QTY}
                                    </a>
                                </td>
                            </g:elseif>
                            <g:elseif test="${headInstance == 'ACTUAL_INOUT_QTY'}">
                                <td name="INOUTQTY${i}">
                                    <a href="${request.getContextPath()}/OneReport/oneReportStep?params=IN&stageId=<%=dataInstance.STAGE_ID%>&startTime=<%=params.startTime%>&endTime=<%=params.endTime%>"
                                       data-toggle="navtab" data-id="dialog-normal"
                                       data-options="{id:'oneReportStep', title:'进站明细'}">
                                        ${dataInstance.ACTUAL_INOUT_QTY}
                                    </a>
                                </td>
                            </g:elseif>
                            <g:elseif test="${headInstance == 'WIP_QTY'}">
                                <td name="WIPQTY${i}">
                                    <a href="${request.getContextPath()}/OneReport/oneReportStep?params=WIP&stageId=<%=dataInstance.STAGE_ID%>&startTime=<%=params.startTime%>&endTime=<%=params.endTime%>"
                                        data-toggle="navtab" data-id="dialog-normal"
                                        data-options="{id:'oneReportStep', title:'WIP明细'}">
                                        ${dataInstance.WIP_QTY}
                                    </a>
                                </td>
                            </g:elseif>
                            <g:elseif test="${headInstance == 'ACTUAL_OUT_QTY'}">
                                <td name="OUTQTY${i}">
                                    <a href="${request.getContextPath()}/OneReport/oneReportStep?params=OUT&stageId=<%=dataInstance.STAGE_ID%>&startTime=<%=params.startTime%>&endTime=<%=params.endTime%>"
                                       data-toggle="navtab" data-id="dialog-normal"
                                       data-options="{id:'oneReportStep', title:'已出站明细'}">
                                        ${dataInstance.ACTUAL_OUT_QTY}
                                    </a>
                                </td>
                            </g:elseif>
                            <g:elseif test="${headInstance == 'YIELD'}">
                                <td name="YIELD${i}">${dataInstance.YIELD}</td>
                            </g:elseif>
                            <g:elseif test="${headInstance == 'HOLD'}">
                                <td name="HOLD${i}">
                                    <a href="${request.getContextPath()}/OneReport/oneReportStep?params=HOLD&stageId=<%=dataInstance.STAGE_ID%>&startTime=<%=params.startTime%>&endTime=<%=params.endTime%>"
                                        data-toggle="navtab" data-id="dialog-normal"
                                        data-options="{id:'oneReportStep', title:'HOLD明细'}">${dataInstance["${headInstance}"]}</a>
                                </td>
                            </g:elseif>
                            <g:elseif test="${headInstance == 'Q'}">
                                <td name="WAIT${i}">
                                    <a href="${request.getContextPath()}/OneReport/oneReportStep?params=WAIT&stageId=<%=dataInstance.STAGE_ID%>&startTime=<%=params.startTime%>&endTime=<%=params.endTime%>"
                                        data-toggle="navtab" data-id="dialog-normal"
                                        data-options="{id:'oneReportStep', title:'站外等待明细'}">${dataInstance["${headInstance}"]}</a>
                                </td>
                            </g:elseif>
                            <g:elseif test="${headInstance == 'REWORK_COUNT'}">
                                <td name="REWORK${i}">
                                    <a href="${request.getContextPath()}/OneReport/oneReportStep?params=REWORK&stageId=<%=dataInstance.STAGE_ID%>&startTime=<%=params.startTime%>&endTime=<%=params.endTime%>"
                                        data-toggle="navtab" data-id="dialog-normal"
                                        data-options="{id:'oneReportStep', title:'返工明细'}">${dataInstance["${headInstance}"]}</a>
                                </td>
                            </g:elseif>
                            <g:elseif test="${headInstance == 'SCRAP_COUNT'}">
                                <td name="SCRAP${i}">
                                    <a href="${request.getContextPath()}/OneReport/oneReportStep?params=SCRAP&stageId=<%=dataInstance.STAGE_ID%>&startTime=<%=params.startTime%>&endTime=<%=params.endTime%>"
                                        data-toggle="navtab" data-id="dialog-normal"
                                        data-options="{id:'oneReportStep', title:'报废明细'}">${dataInstance["${headInstance}"]}</a>
                                </td>
                            </g:elseif>
                            <g:elseif test="${headInstance == 'REWORK_YIELD'}">
                                <td name="REWORKYIELD${i}">${dataInstance["${headInstance}"]}</td>
                            </g:elseif>
                            <g:elseif test="${headInstance == 'SCRAP_YIELD'}">
                                <td name="SCRAPYIELD${i}">${dataInstance["${headInstance}"]}</td>
                            </g:elseif>
                        </g:each>
                    </tr>
                </g:each>
                %{--<tr>--}%
                    %{--<td colspan="2">合计1</td>--}%
                    %{--<td name="waitShow"></td>--}%
                    %{--<td name="wipShow"></td>--}%
                    %{--<td name="inOutQtyShow"></td>--}%
                    %{--<td name="inQtyShow"></td>--}%
                    %{--<td name="outQtyShow"></td>--}%
                    %{--<td name="yieldShow"></td>--}%
                    %{--<td name="holdShow"></td>--}%
                    %{--<td name="reworkShow"></td>--}%
                    %{--<td name="reworkYieldShow"></td>--}%
                    %{--<td name="scrapShow"></td>--}%
                    %{--<td name="scrapYieldShow"></td>--}%
                %{--</tr>--}%
                <tr>
                    <td colspan="2">合计</td>
                    <td>
                        <a href="${request.getContextPath()}/OneReport/oneReportStep?params=WAIT&startTime=<%=params.startTime%>&endTime=<%=params.endTime%>"
                           data-toggle="navtab" data-id="dialog-normal"
                           data-options="{id:'oneReportStep', title:'站外等待明细'}">
                            ${qtyList[0]}
                        </a>
                    </td>
                    <td>
                        <a href="${request.getContextPath()}/OneReport/oneReportStep?params=WIP&startTime=<%=params.startTime%>&endTime=<%=params.endTime%>"
                           data-toggle="navtab" data-id="dialog-normal"
                           data-options="{id:'oneReportStep', title:'WIP明细'}">
                            ${qtyList[1]}
                        </a>
                    </td>
                    <td>
                        <a href="${request.getContextPath()}/OneReport/oneReportStep?params=IN&startTime=<%=params.startTime%>&endTime=<%=params.endTime%>"
                           data-toggle="navtab" data-id="dialog-normal"
                           data-options="{id:'oneReportStep', title:'进站明细'}">
                            ${qtyList[2]}
                        </a>
                    </td>
                    <td>
                        <a href="${request.getContextPath()}/OneReport/oneReportStep?params=RUN&startTime=<%=params.startTime%>&endTime=<%=params.endTime%>"
                           data-toggle="navtab" data-id="dialog-normal"
                           data-options="{id:'oneReportStep', title:'站内明细'}">
                            ${qtyList[3]}
                        </a>
                    </td>
                    <td>
                        <a href="${request.getContextPath()}/OneReport/oneReportStep?params=OUT&startTime=<%=params.startTime%>&endTime=<%=params.endTime%>"
                           data-toggle="navtab" data-id="dialog-normal"
                           data-options="{id:'oneReportStep', title:'已出站明细'}">
                            ${qtyList[4]}
                        </a>
                    </td>
                    <td>${qtyList[5]}</td>
                    <td>
                        <a href="${request.getContextPath()}/OneReport/oneReportStep?params=HOLD&startTime=<%=params.startTime%>&endTime=<%=params.endTime%>"
                           data-toggle="navtab" data-id="dialog-normal"
                           data-options="{id:'oneReportStep', title:'HOLD明细'}">
                            ${qtyList[6]}
                        </a>
                    </td>
                    <td>
                        <a href="${request.getContextPath()}/OneReport/oneReportStep?params=REWORK&startTime=<%=params.startTime%>&endTime=<%=params.endTime%>"
                           data-toggle="navtab" data-id="dialog-normal"
                           data-options="{id:'oneReportStep', title:'返工明细'}">
                            ${qtyList[7]}
                        </a>
                    </td>
                    <td>${qtyList[8]}</td>
                    <td>
                        <a href="${request.getContextPath()}/OneReport/oneReportStep?params=SCRAP&startTime=<%=params.startTime%>&endTime=<%=params.endTime%>"
                           data-toggle="navtab" data-id="dialog-normal"
                           data-options="{id:'oneReportStep', title:'报废明细'}">
                            ${qtyList[9]}
                        </a>
                    </td>
                    <td>${qtyList[10]}</td>
                </tr>
                %{--</g:if>--}%
                </tbody>
            </table>
        </div>

        <div class="row" style="padding: 0px 0px;margin: 15px auto">
            <div class="col-md-12" style="padding: 0px;margin: 0px">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><i class="fa fa-line-chart fa-fw"></i>

                            数据分析图

                        </h3>
                    </div>

                    <div class="panel-body">
                        <div id="oneReport" style="height:420px;"></div>
                    </div>
                </div>
            </div>

        </div>

        <div class="row" style="padding: 0px 0px;">
            <div class="col-md-12" style="padding: 0px;margin: 0px">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><i class="fa fa-line-chart fa-fw"></i>

                            每日比率

                        </h3>
                    </div>

                    <div class="panel-body">
                        <div id="oneReport1" style="height:420px;"></div>
                    </div>
                </div>
            </div>

        </div>

        <div class="row" style="padding: 0px 0px;">
            <div class="col-md-12" style="padding: 0px;margin: 0px">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><i class="fa fa-line-chart fa-fw"></i>

                            每日返工率

                        </h3>
                    </div>

                    <div class="panel-body">
                        <div id="oneReport2" style="height:420px;"></div>
                    </div>
                </div>
            </div>

        </div>

        <div class="row" style="padding: 0px 0px;">
            <div class="col-md-12" style="padding: 0px;margin: 0px">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><i class="fa fa-line-chart fa-fw"></i>

                            每日报废率

                        </h3>
                    </div>

                    <div class="panel-body">
                        <div id="oneReport3" style="height:420px;"></div>
                    </div>
                </div>
            </div>

        </div>
    </g:if>
    <g:else>
        <g:render template="../template/emptyPanel"/>
    </g:else>
</div>
<g:if test="${oneReport.size() > 0}">
    %{--<script>--}%
        %{--$(function () {--}%
            %{--var inQty = 0;--}%
            %{--var outQty = 0;--}%
            %{--var wipQty = 0;--}%
            %{--var inOutQty = 0;--}%
            %{--var num = 0;--}%
            %{--var hold = 0;--}%
            %{--var wait = 0;--}%
            %{--var rework = 0;--}%
            %{--var scrap = 0;--}%
            %{--var num1 = 0;--}%
            %{--var num2 = 0;--}%
            %{--// 站内--}%
            %{--for (var i = 0; i <${oneReport.size()}; i++) {--}%
                %{--var inqty = 'INQTY' + i--}%
                %{--var inQtyAdd = $("td[name='" + inqty + "']").text() == '' ? 0 : parseInt($("td[name='" + inqty + "']").text())--}%
                %{--inQty += inQtyAdd--}%
            %{--}--}%
            %{--// 已出站--}%
            %{--for (var i = 0; i <${oneReport.size()}; i++) {--}%
                %{--var outqty = 'OUTQTY' + i--}%
                %{--var outQtyAdd = $("td[name='" + outqty + "']").text() == '' ? 0 : parseInt($("td[name='" + outqty + "']").text())--}%
                %{--outQty += outQtyAdd--}%
            %{--}--}%
            %{--// WIP--}%
            %{--for (var i = 0; i <${oneReport.size()}; i++) {--}%
                %{--var wipqty = 'WIPQTY' + i--}%
                %{--var wipQtyAdd = $("td[name='" + wipqty + "']").text() == '' ? 0 : parseInt($("td[name='" + wipqty + "']").text())--}%
                %{--wipQty += wipQtyAdd--}%
            %{--}--}%
            %{--// 进站--}%
            %{--for (var i = 0; i <${oneReport.size()}; i++) {--}%
                %{--var inoutqty = 'INOUTQTY' + i--}%
                %{--var inoutQtyAdd = $("td[name='" + inoutqty + "']").text() == '' ? 0 : parseInt($("td[name='" + inoutqty + "']").text())--}%
                %{--inOutQty += inoutQtyAdd--}%
            %{--}--}%
            %{--// hold--}%
            %{--for (var i = 0; i <${oneReport.size()}; i++) {--}%
                %{--var hol = 'HOLD' + i--}%
                %{--var holdAdd = $("td[name='" + hol + "']").text() == '' ? 0 : parseInt($("td[name='" + hol + "']").text())--}%
                %{--hold += holdAdd--}%
            %{--}--}%
            %{--// 等待--}%
            %{--for (var i = 0; i <${oneReport.size()}; i++) {--}%
                %{--var wai = 'WAIT' + i--}%
                %{--var waitAdd = $("td[name='" + wai + "']").text() == '' ? 0 : parseInt($("td[name='" + wai + "']").text())--}%
                %{--wait += waitAdd--}%
            %{--}--}%
            %{--// 返工--}%
            %{--for (var i = 0; i <${oneReport.size()}; i++) {--}%
                %{--var rewor = 'REWORK' + i--}%
                %{--var reworkAdd = $("td[name='" + rewor + "']").text() == '' ? 0 : parseInt($("td[name='" + rewor + "']").text())--}%
                %{--rework += reworkAdd--}%
            %{--}--}%
            %{--// 报废--}%
            %{--for (var i = 0; i <${oneReport.size()}; i++) {--}%
                %{--var scra = 'SCRAP' + i--}%
                %{--var scrapAdd = $("td[name='" + scra + "']").text() == '' ? 0 : parseInt($("td[name='" + scra + "']").text())--}%
                %{--scrap += scrapAdd--}%
            %{--}--}%
            %{--// 达成率--}%
            %{--if (inQty != 0) {--}%
                %{--var number = outQty / (wait + inOutQty) * 100--}%
                %{--num = number.toFixed(2)--}%
            %{--}--}%
            %{--// 返工率--}%
            %{--if (outQty != 0) {--}%
                %{--var reworkYield = rework / outQty * 100--}%
                %{--num1 = reworkYield.toFixed(2)--}%
            %{--}--}%
            %{--// 报废率--}%
            %{--if (outQty != 0) {--}%
                %{--var scrapYield = scrap / outQty * 100--}%
                %{--num2 = scrapYield.toFixed(2)--}%
            %{--}--}%
            %{--$("td[name='inQtyShow']").html(inQty)--}%
            %{--$("td[name='wipShow']").html(wipQty)--}%
            %{--$("td[name='outQtyShow']").html(outQty)--}%
            %{--$("td[name='inOutQtyShow']").html(inOutQty)--}%
            %{--$("td[name='yieldShow']").html(num)--}%
            %{--$("td[name='holdShow']").html(hold)--}%
            %{--$("td[name='waitShow']").html(wait)--}%
            %{--$("td[name='reworkShow']").html(rework)--}%
            %{--$("td[name='scrapShow']").html(scrap)--}%
            %{--$("td[name='reworkYieldShow']").html(num1)--}%
            %{--$("td[name='scrapYieldShow']").html(num2)--}%
        %{--})--}%
    %{--</script>--}%
    <script src="${request.getContextPath()}/js/echarts/echarts.js"></script>
    <script src="${request.getContextPath()}/js/echarts/echarts-tool.js"></script>
    <script type="text/javascript">
        var contextPath = "${request.getContextPath()}";
        eChartsTool.init(contextPath);
        var data = []
        <g:each in="${oneReport}" var="x">
        data.push('${x.STAGE_ID}')
        </g:each>
        var option = {
            title: {
                text: '数据分析图'
            },
            toolbox: {
                show: true,
                feature: {
                    mark: {show: true},
                    dataView: {show: true, readOnly: false},
                    magicType: {show: true, type: ['line', 'bar']},
                    restore: {show: true},
                    saveAsImage: {show: true}
                }
            },
            tooltip: {
                trigger: ''
            },
            legend: {
                data: ['站内', '已出站', '在制', '达成率', '返工率', '报废率']
            },
            xAxis: {
                data: data,
                axisLabel: {
                    interval: 0,
                    rotate: 45
                }
            },
            yAxis: [
                {
                    type: 'value',
                    name: '数量',
                    axisLabel: {
                        formatter: '{value}'
                    },
                    show: true
                },
                {
                    type: 'value',
                    name: '百分比',
                    max: 100,
                    min: 0,
                    axisLabel: {
                        formatter: '{value}%'
                    },
                    show: true
                }

            ],
            series: [
                {
                    name: '站内',
                    itemStyle: {
                        normal: {
                            color: '#4ad2ff',
                            label: {
                                show: true,
                                position: 'top',
                                textStyle: {
                                    fontSize: '10',
                                    fontFamily: '微软雅黑',
                                    fontWeight: 'bold',
                                    color: '#00DD00'
                                }
                            }
                        }
                    },
                    type: 'bar',
                    data:${oneReport.ACTUAL_QTY}
                },
                {
                    name: '已出站',
                    itemStyle: {
                        normal: {
                            color: '#FF8800',
                            label: {
                                show: true,
                                position: 'top',
                                textStyle: {
                                    fontSize: '10',
                                    fontFamily: '微软雅黑',
                                    fontWeight: 'bold',
                                    color: '#CC00FF'
                                }
                            }
                        }
                    },
                    type: 'bar',
                    data:${oneReport.ACTUAL_OUT_QTY}
                },
                {
                    name: '在制',
                    itemStyle: {
                        normal: {
                            color: '#99ff66',
                            label: {
                                show: true,
                                position: 'top',
                                textStyle: {
                                    fontSize: '10',
                                    fontFamily: '微软雅黑',
                                    fontWeight: 'bold',
                                    color: '#CC00FF'
                                }
                            }
                        }
                    },
                    type: 'bar',
                    data:${oneReport.WIP_QTY}
                },
                {
                    name: '达成率',
                    itemStyle: {
                        normal: {
                            color: '#227700',
                            label: {
                                show: true,
                                position: 'top',
                                textStyle: {
                                    fontSize: '10',
                                    fontFamily: '微软雅黑',
                                    fontWeight: 'bold',
                                    color: '#227700',
                                }
                            }
                        }
                    },
                    type: 'line',
                    data:${oneReport.YIELD},
                    yAxisIndex: 1
                },
                {
                    name: '返工率',
                    itemStyle: {
                        normal: {
                            color: '#FF0066',
                            label: {
                                show: true,
                                position: 'top',
                                textStyle: {
                                    fontSize: '10',
                                    fontFamily: '微软雅黑',
                                    fontWeight: 'bold',
                                    color: '#FF0066'
                                }
                            }
                        }
                    },
                    type: 'line',
                    data:${oneReport.REWORK_YIELD},
                    yAxisIndex: 1
                },
                {
                    name: '报废率',
                    itemStyle: {
                        normal: {
                            color: '#0066ff',
                            label: {
                                show: true,
                                position: 'top',
                                textStyle: {
                                    fontSize: '10',
                                    fontFamily: '微软雅黑',
                                    fontWeight: 'bold',
                                    color: '#000000'
                                }
                            }
                        }
                    },
                    type: 'line',
                    data:${oneReport.SCRAP_YIELD},
                    yAxisIndex: 1
                }

            ]
        };
        eChartsTool.setOption("infographic", document.getElementById('oneReport'), option);
    </script>
    <script type="text/javascript">
        var contextPath = "${request.getContextPath()}";
        eChartsTool.init(contextPath);
        var data2 = []
        var data1 = []
        <g:each in="${picHead}" var="x">
        data2.push('${x.TRANS_TIME}')
        </g:each>
        <g:each in="${oneReport}" var="x">
        data1.push('${x.STAGE_ID}')
        </g:each>
        var option1 = {
            title: {
                text: '每日比率',
            },
            tooltip: {
                trigger: 'axis'
            },
            legend: {
                data: data1
            },
            toolbox: {
                show: true,
                feature: {
                    mark: {show: true},
                    dataView: {show: true, readOnly: false},
                    magicType: {show: true, type: ['line', 'bar']},
                    restore: {show: true},
                    saveAsImage: {show: true}
                }
            },
            calculable: true,
            xAxis: [
                {
                    type: 'category',
                    boundaryGap: false,
                    data: data2
                }
            ],
            yAxis: [
                {
                    type: 'value',
                    name: '百分比',
                    axisLabel: {
                        formatter: '{value}%'
                    },
                    show: true
                }
            ],
            series: [
                <g:each in="${oneReport}" var="pic">
                {
                    name: '${pic.STAGE_ID}',
                    type: 'line',
                    data: ${pic1List["${pic.STAGE_ID}"]},
                },
                </g:each>
            ]
        };
        eChartsTool.setOption("infographic", document.getElementById('oneReport1'), option1);
    </script>

    <script type="text/javascript">
        var contextPath = "${request.getContextPath()}";
        eChartsTool.init(contextPath);
        var data2 = []
        var data1 = []
        <g:each in="${picHead}" var="x">
        data2.push('${x.TRANS_TIME}')
        </g:each>
        <g:each in="${oneReport}" var="x">
        data1.push('${x.STAGE_ID}')
        </g:each>
        var option1 = {
            title: {
                text: '每日返工率',
            },
            tooltip: {
                trigger: 'axis'
            },
            legend: {
                data: data1
            },
            toolbox: {
                show: true,
                feature: {
                    mark: {show: true},
                    dataView: {show: true, readOnly: false},
                    magicType: {show: true, type: ['line', 'bar']},
                    restore: {show: true},
                    saveAsImage: {show: true}
                }
            },
            calculable: true,
            xAxis: [
                {
                    type: 'category',
                    boundaryGap: false,
                    data: data2
                }
            ],
            yAxis: [
                {
                    type: 'value',
                    name: '百分比',
                    axisLabel: {
                        formatter: '{value}%'
                    },
                    show: true
                }
            ],
            series: [
                <g:each in="${oneReport}" var="pic">
                {
                    name: '${pic.STAGE_ID}',
                    type: 'line',
                    data: ${pic2List["${pic.STAGE_ID}"]},
                },
                </g:each>
            ]
        };
        eChartsTool.setOption("infographic", document.getElementById('oneReport2'), option1);
    </script>

    <script type="text/javascript">
        var contextPath = "${request.getContextPath()}";
        eChartsTool.init(contextPath);
        var data2 = []
        var data1 = []
        <g:each in="${picHead}" var="x">
        data2.push('${x.TRANS_TIME}')
        </g:each>
        <g:each in="${oneReport}" var="x">
        data1.push('${x.STAGE_ID}')
        </g:each>
        var option1 = {
            title: {
                text: '每日报废率',
            },
            tooltip: {
                trigger: 'axis'
            },
            legend: {
                data: data1
            },
            toolbox: {
                show: true,
                feature: {
                    mark: {show: true},
                    dataView: {show: true, readOnly: false},
                    magicType: {show: true, type: ['line', 'bar']},
                    restore: {show: true},
                    saveAsImage: {show: true}
                }
            },
            calculable: true,
            xAxis: [
                {
                    type: 'category',
                    boundaryGap: false,
                    data: data2
                }
            ],
            yAxis: [
                {
                    type: 'value',
                    name: '百分比',
                    axisLabel: {
                        formatter: '{value}%'
                    },
                    show: true
                }
            ],
            series: [
                <g:each in="${oneReport}" var="pic">
                {
                    name: '${pic.STAGE_ID}',
                    type: 'line',
                    data: ${pic3List["${pic.STAGE_ID}"]},
                },
                </g:each>
            ]
        };
        eChartsTool.setOption("infographic", document.getElementById('oneReport3'), option1);
    </script>
</g:if>